package com.ruoyi.system.service.download.impl;

import com.ruoyi.system.service.IBottomFlatInformationSheetService;
import com.ruoyi.system.service.download.DataQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

@Component
public class BottomFlatInformationSheetDataQuery implements DataQuery {
    @Autowired
    private IBottomFlatInformationSheetService bottomFlatInformationSheetService;
    @Autowired
    private ApplicationContext applicationContext;

    @PostConstruct
    public void init() {
        DataQuery.register("BottomFlatInformationSheet",
                () -> applicationContext.getBean(BottomFlatInformationSheetDataQuery.class));
    }
    
    @Override
    public Object queryById(Long id) {
        return bottomFlatInformationSheetService.selectBottomFlatInformationSheetById(id);
    }

    @Override
    public String getType() {
        return "BottomFlatInformationSheet";
    }
}